using System;
using System.Globalization;
using System.Threading;

namespace Sedna.Core.Globalization
{
	[Obsolete("was initially introduced for the testing purposes, subject to be deleted") ]
	public class Key2KeyMessageManager : IMessageManager
	{
		public Key2KeyMessageManager()
		{
		}

		public string GetMessage(string key)
		{
			return GetMessage(key, Thread.CurrentThread.CurrentCulture);
		}

		public string GetMessage(string key, string defaultValue)
		{
			string value = GetMessage(key);
			return value!=null&&value!=string.Empty?value:defaultValue;
		}

		public string GetMessage(string key, CultureInfo cultureInfo)
		{
			return key;
		}

		public string GetMessage(string key, CultureInfo cultureInfo, string defaultValue)
		{
			string value = GetMessage(key, cultureInfo);
			return value!=null&&value!=string.Empty?value:defaultValue;
		}
	}
}
